Skip to content

Repositories: a staging-only CMS write connection per repository - #253

Merged
nambok merged 1 commit into
mainfrom
feat/new-feature-discipline
Oct 28, 2026
Merged

nambok merged 1 commit into
mainfrom
feat/new-feature-discipline

Conversation

@nambok

@nambok nambok commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Settings > Repositories gets a Staging content button for each turned-on repository. It sets that repository's staging-only CMS write connection. When a new feature changes the CMS schema and the end-to-end tests read pages from the CMS, CoderHelm updates the staging content those tests read through this connection. Without one, the run stops and lists the content that has to change. Backend: CoderHelm/coderhelm-platform#340.

Changes

Staging content dialog (components/staging-cms-dialog.tsx)

  • Fields: project id, staging dataset, optional production dataset, and a write token (a secret field that is never shown again once saved).
  • Built the same way as the existing dialogs: Modal, ModalFooter, a form submitted from the footer, labelled inputs, and an inline error.
  • A dataset that looks like production (production, prod, prd, live, master, main) or matches the named production dataset shows a warning and can't be saved. The gateway refuses it as well.
  • Remove connection appears once a connection is saved.

Repositories page (app/settings/repos/page.tsx)

  • The button shows only for enabled repositories, and only to people who can manage repositories (repos capability).

API (lib/api.ts)

  • getStagingCms, saveStagingCms and deleteStagingCms, with the StagingCms and StagingCmsInput types.

Verification

  • npm run typecheck (dashboard): passed.
  • npm run lint (dashboard UI lint and hosted-links): passed. Root ESLint on the changed files: passed.
  • npm run build (dashboard): passed.
  • New e2e/staging-cms.spec.ts (4 tests), run with --repeat-each=5: 20/20 passed. It covers:
    • an admin saving a connection, after a production name was refused
    • the token not coming back when the dialog opens again
    • no button for members or turned-off repositories
    • no horizontal scroll at 375px and at 1440px
  • e2e/settings.spec.ts and e2e/capabilities.spec.ts: 21/21 passed.

@nambok
nambok merged commit 47e8e3d into main Oct 28, 2026
5 checks passed
@nambok
nambok deleted the feat/new-feature-discipline branch October 28, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant